<template>
  <div class="app-container home-container">
    <div class="home-desc flex-normal">
      <span class="desc-txt">{{getTimeState}}，{{rhUser.nickName}}，新的一天，一定要保持阳光哦~</span>
    </div>
    <component :is="tag"/>
  </div>
</template>

<script>
import {getTimeState} from '@/utils/tools.js'
import {mapGetters} from "vuex"
export default {
  name: "Index",
  components: {
    'admin-home': () => import('@/views/home/admin-home.vue'),
    'shop-home': () => import('@/views/home/shop-home.vue'),
    'agent-home': () => import('@/views/home/agent-home.vue')
  },
  computed: {
    ...mapGetters(['roles', 'rhUser']),
    tag(){
      let {roles = ''} = this
      return `${roles}-home`
    },
  },
  data() {
    return {
      getTimeState: getTimeState(),
    };
  },
  mounted() {
    let _self = this
  },
  methods: {
  },
};
</script>

<style scoped lang="scss">
.home-container {
  padding-top: vh(10);
  height: calc(100vh - 54px);
  display: flex;
  flex-direction: column;
  .home-desc{
    height: vh(54);
    padding: 0 vw(30);
    background: rgba(18, 150, 219, 0.08);
    .desc-txt{
      color: #3D3D3D;
      font-size: vh(16);
    }
  }
}
</style>

